-- GENERATED SPELL FOR [Hakkari Oracle] --


function spell0_11346(pUnit, Event) --@Chain Lightning,n/a--
pUnit:FullCastSpellOnTarget(16006,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_11346', 3000, 1)
end

function spell1_11346(pUnit, Event) --@Earth Shock,n/a--
pUnit:FullCastSpellOnTarget(15501,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_11346', 2320, 1)
end

function spell2_11346(pUnit, Event) --@Healing Wave,Heal--
pUnit:FullCastSpellOnTarget(15982,pUnit)
pUnit:RegisterEvent('Sorts_11346', 3000, 1)
end

function Sorts_11346(pUnit, Event)
local choix_sorts_11346 = math.random(0, 2)
if choix_sorts_11346 == 0 then
pUnit:RegisterEvent('spell0_11346', 1, 1)
end
if choix_sorts_11346 == 1 then
pUnit:RegisterEvent('spell1_11346', 1, 1)
end
if choix_sorts_11346 == 2 then
pUnit:RegisterEvent('spell2_11346', 1, 1)
end
end

function mob11346_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_11346', math.random(1500, 3000), 1)
end

function mob11346_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob11346_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob11346_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(11346, 1, 'mob11346_Action')
RegisterUnitEvent(11346, 2, 'mob11346_Leave')
RegisterUnitEvent(11346, 3, 'mob11346_Kill')
RegisterUnitEvent(11346, 4, 'mob11346_Die')
